home *** CD-ROM | disk | FTP | other *** search
- In a message of 07 Jan 96 Gene Heskett wrote to All:
-
- Y>> if ( tmpbuf[0] & 0x1f == 1 )
-
- GH> Well, while your code *may* be legal, I think what you wanted was:
-
- GH> if ( (tmpbuf[0] & 0x1f) == 1 )
-
- GH> which could be simplified to:
-
- GH> if (tmpbuf[0] & 0x01)
-
- The two statements are different.. If tmpbuf[0] contained 0x11, the original
- statement is not satisfied (0x11 & 0x1f is 0x11, not 1) but the second
- statement is satisfied (0x11 & 0x01 is 0x01).
-
- .\dam. [Team AMIGA] //\ ad32@brighton.ac.uk \\/
-
-